package org.example.day06.service;

import com.alibaba.fastjson2.JSON;
import org.example.day06.dao.IJobInfoDao;
import org.example.day06.dao.JobInfoDaoImpl;

public class JobInfoServiceImpl implements IJobInfoService {
    private IJobInfoDao jobInfoDao = new JobInfoDaoImpl();
    @Override
    public String getCenter2Str() {
        //查询数据库
        Object center2Data = jobInfoDao.getCenter2Data();
        //把数据封装成json字符串
        String jsonStr= JSON.toJSONString(center2Data);
        //JSON.toJSON(center2Data);
        return jsonStr;
    }


}
